import Menu, {IMenuProps} from "./menu";
import SubMenu, {ISubMenuProps} from "./subMenu";
import MenuItem, {IMenuItemProps} from "./menuItem";
import {FC} from "react";


export type IMenuComponent = FC<IMenuProps> & {
    SubMenu: FC<ISubMenuProps>,
    MenuItem: FC<IMenuItemProps>
}

/**
 * 创建新的Menu,那么就可以不用导入SubMenu，MenuItem
 */
const TransMenu = Menu as IMenuComponent

TransMenu.SubMenu = SubMenu
TransMenu.MenuItem = MenuItem

export default TransMenu
